Wading into a pool of promise littered with “failure”
ubiquity + innovation of web -> promise within reach
Will limit this discussion of interactivity to R + JS/HTML
Not really interactive, but why rewrite good code?
library(V8)
ct <- new_context( "window" )
ct$eval (
" console.log( ['I am in JavaScript. 1+1 = ', 1 + 1].join('') ) "
)
## I am in JavaScript. 1+1 = 2
<div id = "manual-example"></div>
<script>
document.getElementById("manual-example")
.innerText = "ugly manual example"
</script>
Use JavaScript without knowing any JavaScript
library(leaflet)
m = leaflet( width = 400, height = 400) %>% addTiles()
m %>% setView( -86.8034743, 33.5025432, zoom=17 )
library(rpivotTable)
rpivotTable( data.frame(Titanic) )
library(qtlcharts)
data(geneExpr)
iplotCorr( geneExpr$expr, geneExpr$genotype, reorder=TRUE
,chartOpts=list( height = 400, width = 800 )
)
library(SVGAnnotation)
library(svgPanZoom)
svgPanZoom(
svgPlot(image(volcano), height = 400, width = 400)
,controlIconsEnabled = T
)
library(epiwidgets)
library(ape)
data(bird.orders)
htmlwidgets::as.iframe(
treewidget(bird.orders,height = 400, width = 800)
)